Add Repositories
2014/08/01 |
Add some useful external repositories to install useful softwares.
|
|
[1] | Install a plugin to add priorities to each installed repositories. |
[root@dlp ~]#
yum -y install yum-plugin-priorities # set [priority=1] to official repository [root@dlp ~]# sed -i -e "s/\]$/\]\npriority=1/g" /etc/yum.repos.d/CentOS-Base.repo
|
[2] | Add EPEL Repository which is provided from Fedora project. |
[root@dlp ~]#
yum -y install epel-release # set [priority=5] [root@dlp ~]# sed -i -e "s/\]$/\]\npriority=5/g" /etc/yum.repos.d/epel.repo
# for another way, change to [enabled=0] and use it only when needed [root@dlp ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo
# if [enabled=0], input a command to use the repository [root@dlp ~]# yum --enablerepo=epel install [Package] |
[3] | Add CentOS SCLo Software collections Repository. |
[root@dlp ~]#
yum -y install centos-release-scl-rh centos-release-scl # set [priority=10] [root@dlp ~]# sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/CentOS-SCLo-scl.repo [root@dlp ~]# sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# for another way, change to [enabled=0] and use it only when needed [root@dlp ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-SCLo-scl.repo [root@dlp ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# if [enabled=0], input a command to use the repository [root@dlp ~]# yum --enablerepo=centos-sclo-rh install [Package] [root@dlp ~]# yum --enablerepo=centos-sclo-sclo install [Package] |
[4] | Add Remi's RPM repository which provides many useful packages. |
[root@dlp ~]#
yum -y install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm # set [priority=10] [root@dlp ~]# sed -i -e "s/\]$/\]\npriority=10/g" /etc/yum.repos.d/remi-safe.repo
# for another way, change to [enabled=0] and use it only when needed [root@dlp ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/remi-safe.repo
# if [enabled=0], input a command to use the repository [root@dlp ~]# yum --enablerepo=remi-safe install [Package] |